package com.jsmile.cloud.msgcenter.api.feign;

import javax.validation.Valid;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.jsmile.cloud.msgcenter.api.constants.MsgConstants;
import com.jsmile.cloud.msgcenter.api.to.SmsTo;
import com.jsmile.mall.api.JSmileResult;

@FeignClient(value = MsgConstants.APPLICATION_NAME, contextId = "msg")
public interface MsgServiceApi {

    /**
     * 短信发送
     */
    @PostMapping("/feign/msg/sendSms")
    JSmileResult sendSms(@RequestBody @Valid SmsTo smsTo);

    /**
     * 验证码验证
     */
    @PostMapping("/feign/msg/verifyCode")
    JSmileResult verifyCode(@RequestBody @Valid SmsTo smsTo);
}
